package com.yunqiao.service.api.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 注册表单
 *
 * @author Mark wangxw725@163.com
 * @since 3.1.0 2018-01-25
 */
@ApiModel(value = "注册表单")
@Data
public class RegisterForm {

    @ApiModelProperty(value = "角色类型:1货主2司机", required = true, allowableValues = "1,2")
    @Min(1)
    @Max(2)
    @NotNull
    private Integer roleType;

    @ApiModelProperty(value = "手机号", required = true)
    @Length(max = 11, min = 11, message = "手机号的长度必须是11位")
    @NotBlank(message = "手机号不能为空")
    private String phone;

    @ApiModelProperty(value = "密码", required = true)
    @NotBlank(message = "密码不能为空")
    private String password;

    @ApiModelProperty(value = "推荐人ID")
    private Long superiorUserId;

    @ApiModelProperty(value = "验证码")
    @NotBlank(message = "验证码不能为空")
    private String smsCode;
    /**
     * 微信唯一标识
     */
    @ApiModelProperty("微信唯一标识")
    private String wxOpenid;
    /**
     * qq唯一标识
     */
    @ApiModelProperty("qq唯一标识")
    private String qqOpenid;

}
